
package com.shop.cereshop.admin.dao.wallet;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.shop.cereshop.admin.param.wallet.WalletParam;
import com.shop.cereshop.commons.domain.wallet.CereBuyerWallet;
import com.shop.cereshop.commons.domain.wallet.WalletTransaction;

import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

@Mapper
public interface WalletTransactionDAO extends BaseMapper<WalletTransaction> {

    int freezedWallet(@Param("param") WalletParam param);

    int cancelFreezedWallet(@Param("param") WalletParam param);

    int checkFreezeStatus(@Param("buyerUserId") Long buyerUserId);

    int checkUnFreezeStatus(@Param("buyerUserId") Long buyerUserId);

    List<CereBuyerWallet> findExpiredFreeze(@Param("now") String now, @Param("pageSize") int pageSize, @Param("lastId") Long lastId);

    int batchUnfreeze(@Param("list") List<Long> walletIds);
}
